<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>AUI快速完成布局</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />

</head>

<body>
  <div id="interpolation">

  </div>




</body>
<script id="interpolationtmpl" type="text/x-dot-template">
    <div class="aui-content" style="background:#fff">
        <div class="aui-row" style="padding:10px;text-align:center">
            <div class="aui-col-xs-4">
                <img src="./img/alipay/allpay.png" style="width:80px;height:80px;display:inline;border-radius:50%">
            </div>
            <div class="aui-col-xs-8" style="text-align:left;line-height:25px;padding-top:10px">
                <h3>支付宝</h3>
                <h3 id="real-name">{{=it.name}}</h3>
            </div>
        </div>
    </div>
    <div style="background-color:#f8f8f8;line-height:10px;padding:14px 20px;">平台支持提现到支付宝</div>
    <div class="aui-content" style="background:#fff;line-height:50px;text-align:left;">
        <div class="aui-row">
            <div class="aui-col-xs-6" style="padding-left:20px;">
                到账时间
            </div>
            <div class="aui-col-xs-6">
                3个工作日，无手续费
            </div>
        </div>
    </div>
    <div style="background-color:#f8f8f8;line-height:10px;padding:14px 20px;">可提现金额：<span style="color:red;">{{=it.money}}</span>元</div>
    <div class="aui-content" style="background:#fff;line-height:50px;text-align:left;border:1px solid #ccc;">
        <div class="aui-row">
            <div class="aui-col-xs-3" style="padding-left:20px;">
                提现金额:
            </div>
            <div class="aui-col-xs-9">
                <input type="text" placeholder="输入提现金额，最低1元" id="money">
            </div>
        </div>
    </div>
    <div style="background-color:#f8f8f8;line-height:10px;padding:14px 20px;">不收手续费，最终到账</div>
    <div style="background-color:#fff;line-height:30px;padding:14px 20px;">
        <h3 style="color:#ff4285;">温馨提醒:</h3>
        <p style="text-indent:1rem;">1.提现金额需是整数,不能包含小数点。</p>
        <p style="text-indent:1rem;">2.建议使用快速提现最快到账</p>
        <p style="text-indent:1rem;">3.三个工作日到账（周六周日不处理，如周四提现，会在下周一到账：周五提现,会在下周二到账）如有问题：请咨询财务QQ:33708455</p>
    </div>
    <div>
        <p style="color:#ff0000;font-size:15px;text-align:right;padding:40px 20px;background-color:#fff;" onclick="fnOpenWin();">[点击查看提现记录]</p>
    </div>

    <div style="height:60px;background:#ff4285;margin:20px;border-radius:10px;color:#fff;font-size:20px;text-align:center;line-height:60px;" tapmode onclick="fnSubmitVal();">
        确认申请
    </div>

</script>

<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="./conf/config.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script type="text/javascript" src="../script/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript">
    apiready = function() {
          fnGetDate();
    };
    function fnGetDate(){
      var userInfo = $api.getStorage("userInfo");
      var userid = userInfo.userid;
      var random = userInfo.random;
      api.ajax({
          url: SITE_URL+'index.php?m=api&c=appnew&a=get_userinfo',
          method: 'get',
          data: {
              values: {
                  'userid': userid,
                  'random': random

              }
          }
      }, function(ret, err) {



          //alert(JSON.stringify(ret));
          fnUpdate(ret);
      });

    }
    function fnUpdate(ret) {
        //var dataInter = {"name":"Jake","age":31};
        var interText = doT.template($("#interpolationtmpl").text());
        $("#interpolation").html(interText(ret));

    }

    function fnOpenWin() {
        api.openWin({
            name: 'depoist_log',
            url: './depoist_log.html',

        });

    }

    function fnSubmitVal() {

        var userInfo = $api.getStorage("userInfo");
        var userid = userInfo.userid;
        var random = userInfo.random;
        var money = $("#money").val();
        api.ajax({
            url: SITE_URL+'index.php?m=api&c=appnew&a=person_cash',
            method: 'post',
            data: {
                values: {
                    'money': money,
                    'type': 2,
                    'paypal': 1,
                    'userid': userid,
                    'random': random
                }
            }
        }, function(ret, err) {
var real_name=$("#real-name").html();
            alert(ret.msg);
            api.openWin({
                name: 'depoist_log',
                url: './depoist_log.html',
                pageParam: {
                  realName:real_name,
                }
            });

        });
    }
</script>

</html>
